﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once

#include "GcmpDatabaseInterface.h"
#include "GbmpQuickCast.h"
#include "IObject.h"
#include <vector>

namespace gcmp
{
    /// \brief 序列化行为接口
    class GCMP_DATABASE_INTERFACE_EXPORT ISerializationBehavior : public IObject
    {
        DEFINE_CAST_DERIVED(ISerializationBehavior, IObject);
    public:
        /// \brief 向bytes中写入对象的数据
        ///
        /// \param bytes 写入的字节
        virtual void Serialize(std::vector<char> & bytes) = 0;

    public:
        /// \brief 析构函数
        virtual ~ISerializationBehavior(void) = 0;
    };
}

